home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FishMarket 1.0
/
FishMarket v1.0.iso
/
fishies
/
051-075
/
disk_066
/
assigned
/
poster
< prev
Wrap
Text File
|
1992-05-06
|
1KB
|
36 lines
Article 1993 of comp.sys.amiga:
Path: mcdsun!noao!hao!hplabs!decwrl!decvax!tektronix!uw-beaver!cornell!batcomputer!hsgj
From: hsgj@batcomputer.tn.cornell.edu (Dan Green)
Newsgroups: comp.sys.amiga
Subject: ASSIGN: solution
Keywords: ASSIGN, Avoiding DOS Insert-Disk Requester
Message-ID: <131@batcomputer.tn.cornell.edu>
Date: 8 Feb 87 00:16:50 GMT
Organization: Theory Center, Cornell U., Ithaca NY
Lines: 107
If you remember, I had a problem where I needed to know whether
a name was ASSIGNed before I used it. Mike Meyer suggested checking
the data structure Assign uses. Following this advice, I was able to do
just what I wanted. Anyways, since the solution was prompted by a
net suggestion, I thought I'd share it:
Included is Assigned() and a test program main(). The way
to use this from a program is like this:
...
if (Assigned("HELP") != AS_UNKNOWN)
/* Read help file from the help disk or directory */
show_help_file("HELP:helpfile");
else
/* Read help file from the current directory */
show_help_file("helpfile");
...
The sample main() just lets you test it from the keyboard. Note that
it is highly case-sensitive. In other words, df0 is unknown, but DF0
is a drive. Note also that you should NOT add a colon: to the name
to be searched.
-- Dan Green
--
ARPA: hsgj%vax2.ccs.cornell.edu@cu-arpa.cs.cornell.edu
UUCP: ihnp4!cornell!batcomputer!hsgj BITNET: hsgj@cornella